/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.member;

import com.enation.app.javashop.client.member.ShopLogisticsCompanyClient;
import com.enation.app.javashop.core.client.fallback.member.ShopLogisticsCompanyClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.shop.dos.ShopLogisticsSetting;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 店铺物流client
 *
 * @author fk
 * @version v7.0
 * @date 19/7/27 下午3:51
 * @since v7.0
 */
@FeignClient(name = "member-service", fallbackFactory = ShopLogisticsCompanyClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface ShopLogisticsCompanyClientFeignImpl extends ShopLogisticsCompanyClient {

    /**
     * 查询绑定该物流公司的列表
     * @param logisticsId
     * @return
     */
    @Override
    @RequestMapping(value = "/client/shops/logistics-company/{logistics_id}", method = RequestMethod.GET)
    List queryListByLogisticsId(@PathVariable("logistics_id") Long logisticsId);

    /**
     * 删除绑定某物流公司的所有店铺
     * @param logisticsId
     */
    @Override
    @RequestMapping(value = "/client/shops/logistics-company/{logistics_id}", method = RequestMethod.DELETE)
    void deleteByLogisticsId(@PathVariable("logistics_id")Long logisticsId);

    /**
     * 查询物流公司
     * @param logisticsId
     * @param sellerId
     * @return
     */
    @Override
    @RequestMapping(value = "/client/shops/logistics-company/{logistics_id}/{seller_id}", method = RequestMethod.GET)
    ShopLogisticsSetting query(@PathVariable("logistics_id")Long logisticsId, @PathVariable("seller_id")Long sellerId);

}
